package com.cq.ssm.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.cq.ssm.mapper.MoveMapper;
import com.cq.ssm.po.Move;
import com.cq.ssm.service.MoveService;

@Component("moveService")
public class MoveServiceImpl implements MoveService {

	@Autowired
	private MoveMapper mm;
	// 插入一条记录
	public boolean insertMove(Move move) throws Exception {
		int i = mm.insertSelective(move);
		return i==1?true:false;
	}

	// 根据id删除一条记录
	public boolean deleteById(Integer id) throws Exception {
		int i = mm.deleteByPrimaryKey(id);
		return i==1?true:false;
	}
}
